<div class="yui-g">
    <div class="rounded linea">
        <div class="borde_amarillo">
            <h1>
                Detalle de su Compra
            </h1>
        </div>
    </div>
    <div class="yui-u first">
        <div class="rounded linea">
            <div class="borde" style="background-color:#fff; padding:5px">
                <div class="pics" id="slideshow" style="text-align : center;"  >
                    <?php // reemplazar este codigo feisimo por un for que leea las imagenese del codigo_*?>
                    <?php
                    if ($this->modelo_ec->product_full_image >='4') {
                        $size = GetImageSize(base_url()."mid/".$this->modelo_ec->product_id.".jpg");
                        $anchura = $size[0];
                        $altura  = $size[1];
                        ?>
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>.jpg"   alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" width="<?=$anchura?>" height="<?=$altura?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>_a.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>_b.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>_c.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" />
                    <?php }elseif ($this->modelo_ec->product_full_image =='3') {
                        $size = GetImageSize(base_url()."mid/".$this->modelo_ec->product_id.".jpg");
                        $anchura = $size[0];
                        $altura  = $size[1];
                        ?>
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>.jpg"   alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>_a.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>_b.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>_b.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" />
                    <?php }elseif ($this->modelo_ec->product_full_image =='2') {
                        $size = GetImageSize(base_url()."mid/".$this->modelo_ec->product_id.".jpg");
                        $anchura = $size[0];
                        $altura  = $size[1];
                        ?>
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>.jpg"   alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>_a.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>.jpg"   alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>_a.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" />
                    <?php }elseif ($this->modelo_ec->product_full_image =='1') {
                        $size = GetImageSize(base_url()."mid/".$this->modelo_ec->product_id.".jpg");
                        $anchura = $size[0];
                        $altura  = $size[1];
                        ?>
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" width="<?=$anchura?>" height="<?=$altura?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" width="<?=$anchura?>" height="<?=$altura?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" width="<?=$anchura?>" height="<?=$altura?>" />
                    <img src="<?=base_url();?>mid/<?=$this->modelo_ec->product_id?>.jpg" alt="<?=$this->modelo_ec->product_name;?>" title="<?=$this->modelo_ec->product_name;?>" width="<?=$anchura?>" height="<?=$altura?>" />
                    <?php }elseif ($this->modelo_ec->product_full_image =='0' || $this->modelo_ec->product_full_image =='' ) {?>
                    El Producto no posee fotos
                    <?php }?>
                </div>
            </div>
        </div>
    </div>
    <div class="yui-u">
        <div class="rounded linea">
            <div class="borde" style="background-color:#fff; padding:5px">
                <form action="<?=base_url()?>index.php/ec/gracias_carrito" method="post">
                    <h1><?=$this->modelo_ec->product_name;?></h1>
                    <div style="height:5px"></div><!-- separator -->
                    <div class="rounded linea">
                        <div class="borde" style="background-color:#fff; padding:5px;">

                            <table border="0" width="100%">
                                <tr>
                                    <td>Ubicaci&oacute;n</td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td align="left" width="100">Precio</td>
                                    <td align="right">$<?=$this->modelo_ec->product_price?></td>
                                </tr>
                                <tr>
                                    <td>Cantidad</td>
                                    <td align="right">
                                        <?php echo $cantidad; ?>
                                        <input name="order_code" type="hidden" value="<?=$this->modelo_ec->product_id;?>">
                                    </td>
                                </tr>
                                <tr>
                                    <td>Sub Total</td>
                                    <td align="right">
                                        <?php
                                        $total_price=$i=0;$color=1;
                                        $precio = $this->modelo_ec->product_price;
                                        $total_price = $cantidad * $precio;
                                        $order_total = $total_price;
                                        $envio = 0;
                                        $total = $order_total + $envio;
                                        ?>
                                        $<?php echo $total_price;?><br>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <b>TOTAL:</b>
                                    </td>
                                    <td align="right">
                                        <b>$<?= number_format($total, 2, '.', ' ');?></b>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div style="height:5px"></div><!-- separator -->
                    <div class="rounded linea">
                        <div class="borde" style="background-color:#fff; padding:5px;">
                            <table border="0">
                                <tr>
                                    <td>
                                        <b>
                                            Por favor, antes de realizar su compra confirme disponibilidad de stock haciendo una
                                            pregunta al vendedor.
                                            <a href="#" onclick="addSiteQuestions(<?=$this->modelo_ec->vendor_id;?>,<?=$this->modelo_ec->product_id;?>);">Clic aqu&iacute Preguntar al Vendedor</a>
                                        </b>
                                        <br><br>
                                        Aqui puedes ver los distintos medios de pago segun te convenga:<br>
                                        Contamos con dos opciones distintas<br><br>
                                        <ul>
                                            <li>
                                                <b>Opcion 1:</b> Pago contra reembolso
                                            </li>
                                            <li>
                                                <b>Opcion 2:</b> Pago usando el sistema MercadoPago, donde podes contar con
                                                pagos con tarjetas, transferencia bancaria, RapiPago y PagoFacil.
                                            </li>
                                        </ul>
                                        <br><br>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="rounded linea">
                                            <div class="borde" style="background-color:#fff; padding:5px;">
                                                <table width="100%" border="0">
                                                    <tr>
                                                        <td align="left">
                                                            <b>(Opcion 1) Pagos contra reembolso:</b><br><br>
                                                            El envio llega a la puerta de tu casa, abonando en efectivo el costo
                                                            de la compra mas el costo del envio al Cadete.
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right" valign="bottom">
                                                            <input name="quantity" value="<?=$cantidad?>" type="hidden">
                                                            <input name="product_id" value="<?=$this->modelo_ec->product_id;?>" type="hidden">
                                                            <input type="image" src="<?=base_url();?>images/confirmarcompra.gif" value="Confirmar Compra" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </form>
                <div style="height:5px"></div><!-- separator -->
                <div class="rounded linea">
                    <div class="borde" style="background-color:#fff; padding:5px;">
                        <table border="0">
                            <tr>
                                <td>
                                    <b>(Opcion 2)<br>
                                        Pagos por MercadoPago:&nbsp;</b><a href="http://www.mercadopago.com/argentina/ml/p_loadhtml?as_menu=M06S03&as_html_code=COMO_FUNCIONA" target="_blank">Clic aqu&iacute Que es MercadoPago?</a>
                                    <br><br>
                                    <span class="txtdatos">Todos los pagos en MercadoPago se realizan en moneda local.</span><br>
                                    Con MercadoPago podes abonar con:<br>
                                    <table width="420" cellspacing="0" cellpadding="0" bordercolor="#8bb2cc" border="0" style="border-collapse: collapse;">
                                        <tbody>
                                            <tr>
                                                <td align="left">
                                                    <div style="padding: 10px 0pt 5px 5px;">
                                                        <img src="<?=base_url();?>images/medios_pago.gif"/>
                                                    </div>
                                                    <table cellspacing="0" cellpadding="0" border="0" align="left" width="100%">
                                                        <tbody>
                                                            <tr>
                                                                <td align="left">
                                                                    <label for="VISA">
                                                                        <img hspace="8" vspace="4" align="absmiddle" src="<?=base_url();?>images/visa.gif" title="Visa"/>
                                                                    </label>
                                                                    <label for="MASTER">
                                                                        <img hspace="8" vspace="4" align="absmiddle" src="<?=base_url();?>images/master.gif" title="Master Card"/>
                                                                    </label>
                                                                    <label for="AMEX">
                                                                        <img hspace="8" vspace="4" align="absmiddle" src="<?=base_url();?>images/amex_pura.gif" title="Amex Pura"/>
                                                                    </label>
                                                                    <label for="AMEXBAN">
                                                                        <img hspace="8" vspace="4" align="absmiddle" src="<?=base_url();?>images/amex_banco.gif" title="Amex Banco"/>
                                                                    </label>
                                                                    <label for="NARANJA">
                                                                        <img hspace="8" vspace="4" align="absmiddle" src="<?=base_url();?>images/tarnaranja.gif" title="Tarjeta Naranja"/>
                                                                    </label>
                                                                    <label for="ACARD">
                                                                        <img hspace="8" vspace="4" align="absmiddle" src="<?=base_url();?>images/acard.gif" title="Argencard"/>
                                                                    </label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">
                                                                    <label for="VISA_TCO">
                                                                        <img hspace="8" vspace="4" align="absmiddle" src="<?=base_url();?>images/visa.gif" title="Visa"/>
                                                                    </label>
                                                                    <label for="PAGOFACIL">
                                                                        <img hspace="8" vspace="4" align="absmiddle" src="<?=base_url();?>images/pagofacil.gif" title="PagoFacil"/>
                                                                    </label>
                                                                    <label for="RAPIPAGO">
                                                                        <img hspace="8" vspace="4" align="absmiddle" src="<?=base_url();?>images/rapipago.gif" title="RapiPago"/>
                                                                    </label>
                                                                    <label for="BAPROPAGO">
                                                                        <img hspace="8" vspace="4" align="absmiddle" src="<?=base_url();?>images/bapro.gif" title="Bapro"/>
                                                                    </label>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                    <br/>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                        </table>
                        <table border="0" width="100%">
                            <tr>
                                <td width="10">&nbsp;</td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <form target="MercadoPago" action="https://www.mercadopago.com/mla/buybutton" method="post">
                                        <input type="image" src="https://www.mercadopago.com/org-img/MP3/buy_now_02.gif" border="0" alt="">
                                        <input type="hidden" name="acc_id" value="4346050">
                                        <input type="hidden" name="url_cancel" value="">
                                        <input type="hidden" name="item_id" value="codigo">
                                        <input type="hidden" name="name" value="<?=$this->modelo_ec->product_name;?>">
                                        <input type="hidden" name="currency" value="ARG">
                                        <input type="hidden" name="price" value="<?= number_format($total, 2, '.', ' ');?>">
                                        <input type="hidden" name="url_process" value="">
                                        <input type="hidden" name="url_succesfull" value="">
                                        <input type="hidden" name="url_post" value="">
                                        <input type="hidden" name="shipping_cost" value="">
                                        <input type="hidden" name="enc" value="6BRcKhbldZQ3xXS%2BXu1MxFo0EOk%3D">
                                        <input type="hidden" name="extraPar" value="">
                                    </form>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div style="height:5px"></div> <!-- separator -->
<div class="yui-g">
    <div class="rounded linea">
        <div class="borde_amarillo">
            <h1>Recordatorio</h1>
        </div>
    </div>
    <div class="rounded linea">
        <div class="borde_blanco">
            Antes de realizar los envios nos pondremos en contacto para coordinar la entrega.<br>
            Muchas Gracias
        </div>
    </div>
</div>
